package com.neudu.glsb.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 冰量配置表
 * @TableName ice_level
 */
@TableName(value ="ice_level")
@Data
public class IceLevel implements Serializable {
    /**
     * 冰量ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 冰量名称（如多冰、少冰）
     */
    private String iceName;

    /**
     * 冰量编码（如more、less，用于前后端交互）
     */
    private String iceCode;

    /**
     * 排序序号
     */
    private Integer sort;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        IceLevel other = (IceLevel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getIceName() == null ? other.getIceName() == null : this.getIceName().equals(other.getIceName()))
            && (this.getIceCode() == null ? other.getIceCode() == null : this.getIceCode().equals(other.getIceCode()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getIceName() == null) ? 0 : getIceName().hashCode());
        result = prime * result + ((getIceCode() == null) ? 0 : getIceCode().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", iceName=").append(iceName);
        sb.append(", iceCode=").append(iceCode);
        sb.append(", sort=").append(sort);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}